using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace viBook.Models
{
    public class Chapter
    {
        

        public int Id { get; set; }

        [Required]
        public string ChapterName { get; set; }

        public string Content { get; set; }
        public int NumberOfComments { get; set; }
        public int NumberOfLikes { get; set; }
        public int NumberOfViews { get; set; }

        //hacked: The order of the following 3 properties can effect the value when insert/update because of ChatperModelBinder
        public virtual IList<Page> Pages { get; set; }
        public string ChapterImage { get; set; }
        public int NumberOfPages { get; set; }

        public int BookId { set; get; }
        public virtual Book Book { get; set; }

        public virtual IEnumerable<ChapterComment> Comments { get; set; }
        public virtual IEnumerable<ChapterComment> Likes { get; set; }

        public virtual bool IsReported { get; set; }
    }
}